<template>
  <li>
    <div>
      <img :src="item.imgUrl" alt="" />
      <h5 v-if="item.score">观众评分 {{ item.score }}</h5>
      <h5 v-else>{{ item.wishNum }} 人想看</h5>
    </div>
    <p class="title">{{ item.title }}</p>
  </li>
</template>

<script>
export default {
  props: {
    item: Object,
  },
};
</script>

<style lang="less" scoped>
@import "../../../../../assets/css/var.less";
li {
  width: 85px;
  height: 144px;
  margin-right: 10px;
  flex-shrink: 0;

  div {
    width: 85px;
    height: 115px;
    position: relative;

    img {
      width: 100%;
      height: 100%;
    }

    h5 {
      position: absolute;
      width: 100%;
      height: 30px;
      left: 0;
      bottom: 0;
      background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.9)
      );
      color: #faaf00;
      font-size: @xs-font;
      line-height: 40px;
    }
  }

  &:last-child {
    margin: 0;
  }

  .title {
    font-size: @s-font;
    margin-top: 5px;
    .ell();
    font-weight: 900;
  }
}
</style>
